<template>
  <div>web3</div>
  <!-- <deepseek /> -->
  <wallet />
</template>
<script setup>
import Web3 from "web3";
import deepseek from "./view/deepseek.vue";
import wallet from "./view/wallet.vue";

let web3 = new Web3(
  Web3.givenProvider ||
    "https://mainnet.infura.io/v3/7c504602d7a2442cb8ed692deb340e41"
);

console.log(web3, "web3");
// 生成账户
// let count = web3.eth.accounts.create("123");

// let wb = web3.utils.fromWei("1", "ether");
// let eb = web3.utils.toWei("1", "ether");
// console.log(wb, "wb,eb", eb);

let address = "0xd2FD2Ce0DF403777302b127788fC1eEAf1D0fC2A";
let privateKey =
  "0xddbf364a2d57352a7c778f6535796cc13cee7f213737d76b19e49aaab657f651";
// 获取账户余额
web3.eth.getBalance(address).then((res) => {
  console.log(res, "res======获取账户余额");
});
</script>
